package com.crmapi.mapper;

import com.crmapi.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>Project: CRMSystem - UserMapper</p>
 * <p>Powered by yzc On 2023-11-15 15:54:13</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@Mapper
public interface UserMapper {

    //查询用户
    List<User> queryUser(@Param("name") String name, @Param("deptName") String deptName,
                         @Param("jobName") String jobName, @Param("status") Integer status);

    //根据部门编码查询部门内编码最大值
    String queryMaxNo(String deptNo);

    //保存用户
    int save(User user);

    //批量删除
    int delByIds(List<String> ids);

    //更新用户
    int update(User user);

    //用户登录
    User userLogin( String username);

    //修改用户密码
    int updatePassword(@Param("id") String id,@Param("password") String password);


    //查找相同用户名
    int queryUsername(String username);



}
